/**
 * 
 */
package com.apache.tools;

import java.util.Map;

/**
 * 
 * <p>@Description 配置文件帮助类
 * <p>@Copyright(c)2013:
 * <p>@Author: lvcai
 * <p>@Create Date Sep 13, 2013 3:16:23 PM
 * <p>@Modified By:lvcai
 * <p>@Modified Date:Sep 13, 2013 3:16:23 PM
 * <p>@version v1.0
 */
public class PropertiesUtils {

	private static PropertiesUtils instance;

	public PropertiesUtils() {

	}

	public static PropertiesUtils getInstance() {
		if (null == instance) {
			instance = new PropertiesUtils();
		}
		return instance;
	}

	/**
	 * 获取property文件的属性值
	 * @param key
	 * @return
	 */
	public static String getValueByProperty(String propFilePath, String key) {
		return ConfigUtil.getInstance().getValueByProperty(propFilePath, key);//initConfig(key, propFilePath);
	}

	/**
	 * 获取某个配置文件下的所有配置信息
	 * @param propFilePath
	 * @return
	 */
	public static Map<String, String> getAllProperty(String propFilePath) {
		//initConfig("", propFilePath);
		return ConfigUtil.getInstance().getAllProperty(propFilePath);//constant.get(propFilePath);
	}

	public static void main(String[] args) {

	}

}
